import axios from 'axios';

axios.defaults.baseURL='http://127.0.0.1:5000';

//登录接口
export let login=(params)=>axios.post('/users/checkLogin',params);

//用户列表
export let userlist=(params)=>axios.get('/users/list',{params});

//添加用户
export let adduser=(params)=>axios.post('/users/add',params);

//修改用户密码
export let psdchange=(params)=>axios.post('/users/editpwd',params);

//删除账号
export let usedele=(params)=>axios.get('/users/del',{params});

//批量删除
export let batchdel=(params)=>axios.get('/users/batchdel',{params});

//修改账号
export let amenduser=(params)=>axios.post('/users/edit',params);

//检测旧密码是否和新密码相同
export let detectionuser=(params)=>axios.get('/users/checkoldpwd',{params});

//获取个人中心
export let getuser=(params)=>axios.get('/users/accountinfo',{params});

//验证token是否过期
export let verifyToken=(params)=>axios.get('/users/checktoken',{params});

